import { createRouter, createWebHashHistory } from 'vue-router'

const router = createRouter({
  history: createWebHashHistory(),
  routes: [
    {
      path: '/',
      name: 'home',
      component: () => import('../Layout/index.vue'),
      children: [
        {
          alias: '/',
          path: 'formConfirm',
          component: () => import('../views/CSS/FormConfirm.vue'),
          meta: { name: '表单验证' }
        },
        {
          path: 'builtInput',
          component: () => import('../views/CSS/BuiltInput.vue'),
          meta: { name: '表单美化' }
        },
        {
          path: 'water',
          component: () => import('../views/CSS/Water.vue'),
          meta: { name: '水滴' }
        },
        {
          path: 'WatchWeb',
          component: () => import('../views/WebApi/WatchWeb.vue'),
          meta: { name: '网络状态监控' }
        },
        {
          path: 'ballmove',
          component: () => import('../views/WebApi/BallMove.vue'),
          meta: { name: '小球点击移动' }
        },
        {
          path: 'imglazyload',
          component: () => import('../views/WebApi/ImgLazyLoad.vue'),
          meta: { name: '图片懒加载' }
        },
      ]
    }
  ]
})

export default router
